package com.dongdongsongcan.app.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;

import com.dongdongsongcan.app.R;
import com.dongdongsongcan.app.control.bean.AddressData.Address;
import com.su.dolphin.utils.ViewUtil;

public class AddressItem extends BaseViewItem<Address> {

    private TextView mAddressitem_user;
    private TextView mAddressitem_address;

    public AddressItem(Context context) {
        mContainer = ViewUtil
                .inflateView(R.layout.layout_address_item, context);
        mAddressitem_user = (TextView) mContainer
                .findViewById(R.id.addressitem_user);
        mAddressitem_address = (TextView) mContainer
                .findViewById(R.id.addressitem_address);
    }

    public void setInfo(Address address) {
        if (address == null) {
            return;
        }
        mAddressitem_address.setText(address.getInfo_area()
                + address.getInfo_louhao1());
        mAddressitem_user.setText(address.getInfo_name() + address.getInfo_sex());
    }

}
